<%--
  Created by IntelliJ IDEA.
  User: XiongMM
  Date: 2019/7/23
  Time: 下午8:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page import="java.util.Date" %>
<html>
<head>
    <title>JSP页面案例</title>
</head>
<body bgcolor="#00ced1">
<%!
    Date date = null;
    int sum = 0;

    public int add(int m, int n) {
        return m + n;
    }
%>

<font size="24">

    程序片段创建Date对象：

    <%
        date = new Date();
        response.getWriter().write("nihaoma,当前时间为：" + date);
        sum = add(10, 10);
    %>
    <br>前看下面将输出结果<br/>
    <%= sum * 100 %>
</font>
</body>
</html>
